package cn.sumpu.app.guoguojie.biz;


import java.util.List;

import cn.sumpu.app.guoguojie.domain.Bonus;
import cn.sumpu.app.guoguojie.domain.BonusApply;
import cn.sumpu.app.guoguojie.domain.Doing;
import cn.sumpu.app.guoguojie.domain.DoingPictorial;
import cn.sumpu.app.guoguojie.domain.Member;
import cn.sumpu.app.guoguojie.domain.MemberDetail;
import cn.sumpu.app.guoguojie.domain.Order;
import cn.sumpu.app.guoguojie.exception.AppBusinessException;
import cn.sumpu.app.guoguojie.util.AlertMsg;
import cn.sumpu.app.guoguojie.util.PageModel;

public interface BonusBiz {
	
	//添加红利
	void addBonus(Bonus bonus)throws AppBusinessException;
	//更新红利
	void updateBonusById(Bonus bonus)throws AppBusinessException;
	//修改红利申请
	void updateBonusApplyById(BonusApply bonusApply, Bonus bonus, Order order)throws AppBusinessException;
	//删除红利
	void deleteBonusById(String bonusId)throws AppBusinessException;
	//在后台查询所有红利
	PageModel getBonusAll(Integer pageSize, Integer page) throws AppBusinessException;
	//在后台查询红利申请的会员
	PageModel getBonusApplyAll(String bonus, String status, Boolean enabled, Integer pageSize, Integer page) throws AppBusinessException;
	//在后台查询红利申请的会员总量
	Integer getBonusApplyCount(String bonus, String status, Boolean enabled) throws AppBusinessException;
	
	
	
	
	public PageModel getDoingByBonus(String bonus,int page)throws AppBusinessException;
	
	public void updateViewAmount(String bonus)throws AppBusinessException;
	
	public void updateApplyNums(String bonus)throws AppBusinessException;
	
	public PageModel getBonusList(int page) throws AppBusinessException;
	
	public Bonus getBonusById(String id)throws AppBusinessException;
	
	public List<Member> getLastApplyMember(String bonus)throws AppBusinessException;
	
	public List<Member> getSucApplyMember(String bonus)throws AppBusinessException;
	
	public void insertBonusApply(BonusApply bonusApply)throws AppBusinessException;
	
	public boolean isExistBonusApply(String bonus,String family)throws AppBusinessException;
	
	public AlertMsg applyBonus(Doing doing,String pictureList, String bonus,String ip,Member member,String memo)throws AppBusinessException;
	
	public void updateApplyInfo(String username,MemberDetail memberDetail)throws AppBusinessException;
	
	public List<Bonus> getCanApply(String bonus,String family)throws AppBusinessException;
	
	public List<BonusApply> getApplyNow()throws AppBusinessException;
	
	//首页红利会
	public Bonus getIndexBonus()throws AppBusinessException;
	
	//首页红利会试用报告
	public List<DoingPictorial> getIndexBonusReply()throws AppBusinessException;
	
}
